// pages/userinfo/userinfo.js
import cache from '../../utils/Cache.js';
import url from '../../utils/url.js';
import http from '../../utils/http.js';
Page({

  /**
   * 页面的初始数据
   */
  data: {
      userinfo : {}
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    http.http(url.getuserinfo, 'GET', { openid: cache.getSorg('openid')},function(res){
      that.setData({
        userinfo:res.userinfo
      });
    });
  },
  editUserInfo:function(event){
      wx.navigateTo({
        url: '../../pages/edituser/edituser',
      })
  }

  
})